Skip to content

Conversation

@akowalska622
Copy link
Contributor

@akowalska622 akowalska622 commented Oct 31, 2025

Summary

Closes #238831

After wrapping cell into a div in purpose of in-table-search (we need a ref there) we lost cell content truncation, because styles applied by EUI are not inherited further.

UI before in-table-search
SCR-20251031-kwra

UI after in-table-search
SCR-20251031-kxhc

EUI docs
SCR-20251031-ldam

As a solution, I firstly added a .eui-textTruncate class directly to that new div, however it was then applied to multilines as well and the class forced one-line text render, no matter of body cell lines count.

SCR-20251031-kxqy SCR-20251031-kylo SCR-20251031-liyv

Eventually I've targeted .euiDataGridRowCell__content--defaultHeight > div (targeting --defaultHeight is already a workaround for one line summary truncation) and applied truncation styles manually. Another possibility would be applying euiTextTruncate() helper, however it doesn't work in an object syntax we use here (following to Emotion standards).

I'm open to refactor to css`` syntax, which accepts euiTextTruncate() if we prefer to use EUI helper, instead of keeping Emotion syntax aligned.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@akowalska622 akowalska622 self-assigned this Oct 31, 2025
@akowalska622 akowalska622 added release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// backport:version Backport to applied version labels v8.19.7 v9.1.7 labels Oct 31, 2025
@akowalska622 akowalska622 marked this pull request as ready for review October 31, 2025 11:17
@akowalska622 akowalska622 requested a review from a team as a code owner October 31, 2025 11:17
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@akowalska622 akowalska622 marked this pull request as draft October 31, 2025 11:23
@akowalska622 akowalska622 marked this pull request as ready for review October 31, 2025 13:39
@akowalska622 akowalska622 requested a review from a team as a code owner October 31, 2025 13:39
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #74 / cases security and spaces enabled: trial Common analytics indexes backfill task should backfill the cases attachments index
  • [job] [logs] FTR Configs #31 / dashboard app - group 4 dashboard time dashboard with stored timed sets time on open
  • [job] [logs] FTR Configs #65 / discover - group 1 Discover CSV Export Generate CSV: new search generates a large export

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cloudSecurityPosture 638.1KB 638.2KB +137.0B
discover 1.2MB 1.2MB +137.0B
esql 582.4KB 582.6KB +137.0B
esqlDataGrid 148.6KB 148.8KB +137.0B
securitySolution 11.0MB 11.0MB +137.0B
slo 984.2KB 984.3KB +137.0B
total +822.0B

History

cc @akowalska622

Comment on lines +1478 to +1483
'.euiDataGridRowCell__content--defaultHeight > div': {
maxInlineSize: '100%',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the root cause of the issue may be that we wrap cell contents in a div which defaults to display: block, preventing the EUI styles from being inherited correctly. Instead of redefining the EUI styles here, what if we just change the wrapping element to a span in InTableSearchHighlightsWrapper so the styles are inherited correctly?

I gave it a quick shot locally and it seemed to work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v8.19.7 v9.1.7 v9.2.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discover] Missing ellipsis in a data table with body cell lines set to 1

4 participants